[IA64] message of elf_sanity_check as x86
authorawilliam@ldap.hp.com <awilliam@ldap.hp.com>
Tue, 25 Apr 2006 17:49:33 +0000 (10:49 -0700)
committerawilliam@ldap.hp.com <awilliam@ldap.hp.com>
Tue, 25 Apr 2006 17:49:33 +0000 (10:49 -0700)
This small patch output message of elf_sanity_check as x86.
Currently this panic is the only following message.

        (XEN) *** LOADING DOMAIN 0 ***
        (XEN)
        (XEN) ****************************************
        (XEN) Panic on CPU 0:
        (XEN) Could not set up DOM0 guest OS
        (XEN) ****************************************
        (XEN)
        (XEN) Reboot in five seconds...
        (XEN) machine_restart called: spinning....

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
xen/arch/ia64/xen/domain.c

index 3b23e1a3b746a3b9e99bbeb17f399d718440510e..67c9b5f0e34768dbbfa7cac5b4f2f33877e94fce 100644 (file)
@@ -751,7 +751,12 @@ unsigned long domain_mpa_to_imva(struct domain *d, unsigned long mpaddr)
 // see arch/x86/xxx/domain_build.c
 int elf_sanity_check(Elf_Ehdr *ehdr)
 {
-       return (IS_ELF(*ehdr));
+       if (!(IS_ELF(*ehdr)))
+       {
+               printk("DOM0 image is not a Xen-compatible Elf image.\n");
+               return 0;
+       }
+       return 1;
 }
 
 static void copy_memory(void *dst, void *src, int size)